package cn.pupil.design;

import java.math.BigDecimal;

/**
 * @Description: 策略控制类
 * @Author: pupil
 * @Date: 2024/08/01 下午 6:16
 */
public class Context<T> {
    private ICouponDiscount<T> iCouponDiscount;

    public Context(ICouponDiscount<T> iCouponDiscount) {
        this.iCouponDiscount = iCouponDiscount;
    }

    public BigDecimal discountAmount(T couponInfo, BigDecimal skuPrice) {
        return iCouponDiscount.discountAmount(couponInfo,skuPrice);
    }
}
